﻿#define _CRT_SECURE_NO_WARNINGS
#include"Contact.h"

int main()
{
	int input;
	struct Contact C;
	struct Contact* p = &C;
	if (0 == INITIALIZE_Contact(p))
	{
		printf("通讯录创建失败\n");
		return 0;
	}
	else
	{
		do
		{
			menu();
			printf("请选择\n");
			scanf("%d", &input);
			switch (input)
			{
			case ADD:
				ADD_Contact(p);
				break;
			case DELETE:
				DELETE_Contact(p);
				break;
			case FIND:
				FIND_Contact(p);
				break;
			case MODIFY:
				MODIFY_Contact(p);
				break;
			case SHOW:
				SHOW_Contact(p);
				break;
			case SORT:
				SORT_Contact(p);
				break;
			case EXIT:
				EXIT_Contact(p);
				break;
			default:
				break;
			}
		} while (input);
	}
	return 0;
}